#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;

int main() {
    int t; cin >> t;
    while (t--) {
        double a, b, c; cin >> a >> b >> c;
        double sum = 0;
        sum = pow(a / 16, 16)
            + 1820 * pow(a / 16, 12) * pow(b / 16, 4)
            + 1820 * pow(a / 16, 12) * pow(c / 16, 4);
        printf("%.10lf\n", sum);
    }
    return 0;
}